3.1.64 \(\int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx\) [64]

3.1.64.1 Optimal result
3.1.64.2 Mathematica [B] (verified)
3.1.64.3 Rubi [A] (verified)
3.1.64.4 Maple [B] (verified)
3.1.64.5 Fricas [C] (verification not implemented)
3.1.64.6 Sympy [F]
3.1.64.7 Maxima [B] (verification not implemented)
3.1.64.8 Giac [F]
3.1.64.9 Mupad [F(-1)]

3.1.64.1 Optimal result

Integrand size = 20, antiderivative size = 405 \[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\frac {b^3 c d x}{f}+\frac {b^3 d^2 x^2}{2 f}-\frac {3 a b^2 (c+d x)^2}{f}+\frac {a^3 (c+d x)^3}{3 d}-\frac {a^2 b (c+d x)^3}{d}+\frac {a b^2 (c+d x)^3}{d}-\frac {b^3 (c+d x)^3}{3 d}+\frac {6 a b^2 d (c+d x) \log \left (1+e^{2 (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^2 \log \left (1+e^{2 (e+f x)}\right )}{f}+\frac {b^3 (c+d x)^2 \log \left (1+e^{2 (e+f x)}\right )}{f}+\frac {b^3 d^2 \log (\cosh (e+f x))}{f^3}+\frac {3 a b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^3}+\frac {3 a^2 b d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^2}+\frac {b^3 d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^2}-\frac {3 a^2 b d^2 \operatorname {PolyLog}\left (3,-e^{2 (e+f x)}\right )}{2 f^3}-\frac {b^3 d^2 \operatorname {PolyLog}\left (3,-e^{2 (e+f x)}\right )}{2 f^3}-\frac {b^3 d (c+d x) \tanh (e+f x)}{f^2}-\frac {3 a b^2 (c+d x)^2 \tanh (e+f x)}{f}-\frac {b^3 (c+d x)^2 \tanh ^2(e+f x)}{2 f} \]

output
b^3*c*d*x/f+1/2*b^3*d^2*x^2/f-3*a*b^2*(d*x+c)^2/f+1/3*a^3*(d*x+c)^3/d-a^2* 
b*(d*x+c)^3/d+a*b^2*(d*x+c)^3/d-1/3*b^3*(d*x+c)^3/d+6*a*b^2*d*(d*x+c)*ln(1 
+exp(2*f*x+2*e))/f^2+3*a^2*b*(d*x+c)^2*ln(1+exp(2*f*x+2*e))/f+b^3*(d*x+c)^ 
2*ln(1+exp(2*f*x+2*e))/f+b^3*d^2*ln(cosh(f*x+e))/f^3+3*a*b^2*d^2*polylog(2 
,-exp(2*f*x+2*e))/f^3+3*a^2*b*d*(d*x+c)*polylog(2,-exp(2*f*x+2*e))/f^2+b^3 
*d*(d*x+c)*polylog(2,-exp(2*f*x+2*e))/f^2-3/2*a^2*b*d^2*polylog(3,-exp(2*f 
*x+2*e))/f^3-1/2*b^3*d^2*polylog(3,-exp(2*f*x+2*e))/f^3-b^3*d*(d*x+c)*tanh 
(f*x+e)/f^2-3*a*b^2*(d*x+c)^2*tanh(f*x+e)/f-1/2*b^3*(d*x+c)^2*tanh(f*x+e)^ 
2/f
 
3.1.64.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1163\) vs. \(2(405)=810\).

Time = 7.23 (sec) , antiderivative size = 1163, normalized size of antiderivative = 2.87 \[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\frac {b \left (-4 e^{2 e} f x \left (9 a b d f (2 c+d x)+3 a^2 f^2 \left (3 c^2+3 c d x+d^2 x^2\right )+b^2 \left (3 c^2 f^2+3 c d f^2 x+d^2 \left (3+f^2 x^2\right )\right )\right )+6 \left (1+e^{2 e}\right ) \left (6 a b d f (c+d x)+3 a^2 f^2 (c+d x)^2+b^2 \left (c^2 f^2+2 c d f^2 x+d^2 \left (1+f^2 x^2\right )\right )\right ) \log \left (1+e^{2 (e+f x)}\right )+6 d \left (1+e^{2 e}\right ) \left (3 a b d+3 a^2 f (c+d x)+b^2 f (c+d x)\right ) \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )-3 \left (3 a^2+b^2\right ) d^2 \left (1+e^{2 e}\right ) \operatorname {PolyLog}\left (3,-e^{2 (e+f x)}\right )\right )}{6 \left (1+e^{2 e}\right ) f^3}+\frac {\text {sech}(e) \text {sech}^2(e+f x) \left (6 b^3 c^2 f \cosh (e)+12 b^3 c d f x \cosh (e)+6 a^3 c^2 f^2 x \cosh (e)+18 a b^2 c^2 f^2 x \cosh (e)+6 b^3 d^2 f x^2 \cosh (e)+6 a^3 c d f^2 x^2 \cosh (e)+18 a b^2 c d f^2 x^2 \cosh (e)+2 a^3 d^2 f^2 x^3 \cosh (e)+6 a b^2 d^2 f^2 x^3 \cosh (e)+3 a^3 c^2 f^2 x \cosh (e+2 f x)+9 a b^2 c^2 f^2 x \cosh (e+2 f x)+3 a^3 c d f^2 x^2 \cosh (e+2 f x)+9 a b^2 c d f^2 x^2 \cosh (e+2 f x)+a^3 d^2 f^2 x^3 \cosh (e+2 f x)+3 a b^2 d^2 f^2 x^3 \cosh (e+2 f x)+3 a^3 c^2 f^2 x \cosh (3 e+2 f x)+9 a b^2 c^2 f^2 x \cosh (3 e+2 f x)+3 a^3 c d f^2 x^2 \cosh (3 e+2 f x)+9 a b^2 c d f^2 x^2 \cosh (3 e+2 f x)+a^3 d^2 f^2 x^3 \cosh (3 e+2 f x)+3 a b^2 d^2 f^2 x^3 \cosh (3 e+2 f x)+6 b^3 c d \sinh (e)+18 a b^2 c^2 f \sinh (e)+6 b^3 d^2 x \sinh (e)+36 a b^2 c d f x \sinh (e)+18 a^2 b c^2 f^2 x \sinh (e)+6 b^3 c^2 f^2 x \sinh (e)+18 a b^2 d^2 f x^2 \sinh (e)+18 a^2 b c d f^2 x^2 \sinh (e)+6 b^3 c d f^2 x^2 \sinh (e)+6 a^2 b d^2 f^2 x^3 \sinh (e)+2 b^3 d^2 f^2 x^3 \sinh (e)-6 b^3 c d \sinh (e+2 f x)-18 a b^2 c^2 f \sinh (e+2 f x)-6 b^3 d^2 x \sinh (e+2 f x)-36 a b^2 c d f x \sinh (e+2 f x)-9 a^2 b c^2 f^2 x \sinh (e+2 f x)-3 b^3 c^2 f^2 x \sinh (e+2 f x)-18 a b^2 d^2 f x^2 \sinh (e+2 f x)-9 a^2 b c d f^2 x^2 \sinh (e+2 f x)-3 b^3 c d f^2 x^2 \sinh (e+2 f x)-3 a^2 b d^2 f^2 x^3 \sinh (e+2 f x)-b^3 d^2 f^2 x^3 \sinh (e+2 f x)+9 a^2 b c^2 f^2 x \sinh (3 e+2 f x)+3 b^3 c^2 f^2 x \sinh (3 e+2 f x)+9 a^2 b c d f^2 x^2 \sinh (3 e+2 f x)+3 b^3 c d f^2 x^2 \sinh (3 e+2 f x)+3 a^2 b d^2 f^2 x^3 \sinh (3 e+2 f x)+b^3 d^2 f^2 x^3 \sinh (3 e+2 f x)\right )}{12 f^2} \]

input
Integrate[(c + d*x)^2*(a + b*Tanh[e + f*x])^3,x]
 
output
(b*(-4*E^(2*e)*f*x*(9*a*b*d*f*(2*c + d*x) + 3*a^2*f^2*(3*c^2 + 3*c*d*x + d 
^2*x^2) + b^2*(3*c^2*f^2 + 3*c*d*f^2*x + d^2*(3 + f^2*x^2))) + 6*(1 + E^(2 
*e))*(6*a*b*d*f*(c + d*x) + 3*a^2*f^2*(c + d*x)^2 + b^2*(c^2*f^2 + 2*c*d*f 
^2*x + d^2*(1 + f^2*x^2)))*Log[1 + E^(2*(e + f*x))] + 6*d*(1 + E^(2*e))*(3 
*a*b*d + 3*a^2*f*(c + d*x) + b^2*f*(c + d*x))*PolyLog[2, -E^(2*(e + f*x))] 
 - 3*(3*a^2 + b^2)*d^2*(1 + E^(2*e))*PolyLog[3, -E^(2*(e + f*x))]))/(6*(1 
+ E^(2*e))*f^3) + (Sech[e]*Sech[e + f*x]^2*(6*b^3*c^2*f*Cosh[e] + 12*b^3*c 
*d*f*x*Cosh[e] + 6*a^3*c^2*f^2*x*Cosh[e] + 18*a*b^2*c^2*f^2*x*Cosh[e] + 6* 
b^3*d^2*f*x^2*Cosh[e] + 6*a^3*c*d*f^2*x^2*Cosh[e] + 18*a*b^2*c*d*f^2*x^2*C 
osh[e] + 2*a^3*d^2*f^2*x^3*Cosh[e] + 6*a*b^2*d^2*f^2*x^3*Cosh[e] + 3*a^3*c 
^2*f^2*x*Cosh[e + 2*f*x] + 9*a*b^2*c^2*f^2*x*Cosh[e + 2*f*x] + 3*a^3*c*d*f 
^2*x^2*Cosh[e + 2*f*x] + 9*a*b^2*c*d*f^2*x^2*Cosh[e + 2*f*x] + a^3*d^2*f^2 
*x^3*Cosh[e + 2*f*x] + 3*a*b^2*d^2*f^2*x^3*Cosh[e + 2*f*x] + 3*a^3*c^2*f^2 
*x*Cosh[3*e + 2*f*x] + 9*a*b^2*c^2*f^2*x*Cosh[3*e + 2*f*x] + 3*a^3*c*d*f^2 
*x^2*Cosh[3*e + 2*f*x] + 9*a*b^2*c*d*f^2*x^2*Cosh[3*e + 2*f*x] + a^3*d^2*f 
^2*x^3*Cosh[3*e + 2*f*x] + 3*a*b^2*d^2*f^2*x^3*Cosh[3*e + 2*f*x] + 6*b^3*c 
*d*Sinh[e] + 18*a*b^2*c^2*f*Sinh[e] + 6*b^3*d^2*x*Sinh[e] + 36*a*b^2*c*d*f 
*x*Sinh[e] + 18*a^2*b*c^2*f^2*x*Sinh[e] + 6*b^3*c^2*f^2*x*Sinh[e] + 18*a*b 
^2*d^2*f*x^2*Sinh[e] + 18*a^2*b*c*d*f^2*x^2*Sinh[e] + 6*b^3*c*d*f^2*x^2*Si 
nh[e] + 6*a^2*b*d^2*f^2*x^3*Sinh[e] + 2*b^3*d^2*f^2*x^3*Sinh[e] - 6*b^3...
 
3.1.64.3 Rubi [A] (verified)

Time = 0.99 (sec) , antiderivative size = 396, normalized size of antiderivative = 0.98, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 4205, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^2 (a-i b \tan (i e+i f x))^3dx\)

\(\Big \downarrow \) 4205

\(\displaystyle \int \left (a^3 (c+d x)^2+3 a^2 b (c+d x)^2 \tanh (e+f x)+3 a b^2 (c+d x)^2 \tanh ^2(e+f x)+b^3 (c+d x)^2 \tanh ^3(e+f x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 (c+d x)^3}{3 d}+\frac {3 a^2 b d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^2 \log \left (e^{2 (e+f x)}+1\right )}{f}-\frac {a^2 b (c+d x)^3}{d}-\frac {3 a^2 b d^2 \operatorname {PolyLog}\left (3,-e^{2 (e+f x)}\right )}{2 f^3}+\frac {6 a b^2 d (c+d x) \log \left (e^{2 (e+f x)}+1\right )}{f^2}-\frac {3 a b^2 (c+d x)^2 \tanh (e+f x)}{f}-\frac {3 a b^2 (c+d x)^2}{f}+\frac {a b^2 (c+d x)^3}{d}+\frac {3 a b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^3}+\frac {b^3 d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{f^2}-\frac {b^3 d (c+d x) \tanh (e+f x)}{f^2}+\frac {b^3 (c+d x)^2 \log \left (e^{2 (e+f x)}+1\right )}{f}-\frac {b^3 (c+d x)^2 \tanh ^2(e+f x)}{2 f}+\frac {b^3 (c+d x)^2}{2 f}-\frac {b^3 (c+d x)^3}{3 d}-\frac {b^3 d^2 \operatorname {PolyLog}\left (3,-e^{2 (e+f x)}\right )}{2 f^3}+\frac {b^3 d^2 \log (\cosh (e+f x))}{f^3}\)

input
Int[(c + d*x)^2*(a + b*Tanh[e + f*x])^3,x]
 
output
(-3*a*b^2*(c + d*x)^2)/f + (b^3*(c + d*x)^2)/(2*f) + (a^3*(c + d*x)^3)/(3* 
d) - (a^2*b*(c + d*x)^3)/d + (a*b^2*(c + d*x)^3)/d - (b^3*(c + d*x)^3)/(3* 
d) + (6*a*b^2*d*(c + d*x)*Log[1 + E^(2*(e + f*x))])/f^2 + (3*a^2*b*(c + d* 
x)^2*Log[1 + E^(2*(e + f*x))])/f + (b^3*(c + d*x)^2*Log[1 + E^(2*(e + f*x) 
)])/f + (b^3*d^2*Log[Cosh[e + f*x]])/f^3 + (3*a*b^2*d^2*PolyLog[2, -E^(2*( 
e + f*x))])/f^3 + (3*a^2*b*d*(c + d*x)*PolyLog[2, -E^(2*(e + f*x))])/f^2 + 
 (b^3*d*(c + d*x)*PolyLog[2, -E^(2*(e + f*x))])/f^2 - (3*a^2*b*d^2*PolyLog 
[3, -E^(2*(e + f*x))])/(2*f^3) - (b^3*d^2*PolyLog[3, -E^(2*(e + f*x))])/(2 
*f^3) - (b^3*d*(c + d*x)*Tanh[e + f*x])/f^2 - (3*a*b^2*(c + d*x)^2*Tanh[e 
+ f*x])/f - (b^3*(c + d*x)^2*Tanh[e + f*x]^2)/(2*f)
 

3.1.64.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4205
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 
3.1.64.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1065\) vs. \(2(393)=786\).

Time = 0.43 (sec) , antiderivative size = 1066, normalized size of antiderivative = 2.63

method result size
risch \(\text {Expression too large to display}\) \(1066\)

input
int((d*x+c)^2*(a+b*tanh(f*x+e))^3,x,method=_RETURNVERBOSE)
 
output
4/3/f^3*b^3*d^2*e^3+1/f^3*b^3*d^2*ln(1+exp(2*f*x+2*e))-2/f^3*b^3*d^2*ln(ex 
p(f*x+e))+1/f*b^3*c^2*ln(1+exp(2*f*x+2*e))-2/f*b^3*c^2*ln(exp(f*x+e))-4/f* 
b^3*c*d*e*x-12/f*b*d*c*a^2*e*x+12/f^2*b*e*d*c*a^2*ln(exp(f*x+e))+6/f*b*d*c 
*a^2*ln(1+exp(2*f*x+2*e))*x+4/f^3*b*a^2*d^2*e^3+2/f^2*b^3*d^2*e^2*x-6/f*b^ 
2*a*d^2*x^2-2/f^2*b^3*c*d*e^2-6/f^3*b^2*a*d^2*e^2+1/f*b^3*d^2*ln(1+exp(2*f 
*x+2*e))*x^2+1/f^2*b^3*d^2*polylog(2,-exp(2*f*x+2*e))*x+1/f^2*b^3*c*d*poly 
log(2,-exp(2*f*x+2*e))-2/f^3*b^3*e^2*d^2*ln(exp(f*x+e))+3/f*b*a^2*c^2*ln(1 
+exp(2*f*x+2*e))-6/f*b*a^2*c^2*ln(exp(f*x+e))+6/f^2*b*a^2*d^2*e^2*x-6/f^2* 
b*d*c*a^2*e^2-12/f^2*b^2*a*d^2*e*x+2/f*b^3*c*d*ln(1+exp(2*f*x+2*e))*x+3/f* 
b*a^2*d^2*ln(1+exp(2*f*x+2*e))*x^2+3/f^2*b*a^2*d^2*polylog(2,-exp(2*f*x+2* 
e))*x+12/f^3*b^2*e*a*d^2*ln(exp(f*x+e))+3/f^2*b*d*c*a^2*polylog(2,-exp(2*f 
*x+2*e))+6/f^2*b^2*a*d^2*ln(1+exp(2*f*x+2*e))*x+6/f^2*b^2*a*c*d*ln(1+exp(2 
*f*x+2*e))-12/f^2*b^2*a*c*d*ln(exp(f*x+e))+4/f^2*b^3*e*c*d*ln(exp(f*x+e))- 
6/f^3*b*e^2*a^2*d^2*ln(exp(f*x+e))-c*d*x^2*b^3-1/3*d^2*x^3*b^3+x*b^3*c^2+1 
/3/d*b^3*c^3-3*d*a^2*b*c*x^2+3*d*a*b^2*c*x^2+3*a^2*b*c^2*x+3*a*b^2*c^2*x-d 
^2*a^2*b*x^3+d^2*a*b^2*x^3+d*a^3*c*x^2+a^3*c^2*x+1/d*a^2*b*c^3+1/d*a*b^2*c 
^3+3*a*b^2*d^2*polylog(2,-exp(2*f*x+2*e))/f^3-3/2*a^2*b*d^2*polylog(3,-exp 
(2*f*x+2*e))/f^3-1/2*b^3*d^2*polylog(3,-exp(2*f*x+2*e))/f^3+1/3*d^2*a^3*x^ 
3+1/3/d*a^3*c^3+2*b^2*(3*a*d^2*f*x^2*exp(2*f*x+2*e)+b*d^2*f*x^2*exp(2*f*x+ 
2*e)+6*a*c*d*f*x*exp(2*f*x+2*e)+2*b*c*d*f*x*exp(2*f*x+2*e)+3*a*c^2*f*ex...
 
3.1.64.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.36 (sec) , antiderivative size = 7298, normalized size of antiderivative = 18.02 \[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\text {Too large to display} \]

input
integrate((d*x+c)^2*(a+b*tanh(f*x+e))^3,x, algorithm="fricas")
 
output
Too large to include
 
3.1.64.6 Sympy [F]

\[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\int \left (a + b \tanh {\left (e + f x \right )}\right )^{3} \left (c + d x\right )^{2}\, dx \]

input
integrate((d*x+c)**2*(a+b*tanh(f*x+e))**3,x)
 
output
Integral((a + b*tanh(e + f*x))**3*(c + d*x)**2, x)
 
3.1.64.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 869 vs. \(2 (390) = 780\).

Time = 0.38 (sec) , antiderivative size = 869, normalized size of antiderivative = 2.15 \[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\frac {1}{3} \, a^{3} d^{2} x^{3} + a^{3} c d x^{2} + b^{3} c^{2} {\left (x + \frac {e}{f} + \frac {\log \left (e^{\left (-2 \, f x - 2 \, e\right )} + 1\right )}{f} + \frac {2 \, e^{\left (-2 \, f x - 2 \, e\right )}}{f {\left (2 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )} + 1\right )}}\right )} + a^{3} c^{2} x + \frac {3 \, a^{2} b c^{2} \log \left (\cosh \left (f x + e\right )\right )}{f} + \frac {18 \, a b^{2} c^{2} f + 6 \, b^{3} c d + {\left (3 \, a^{2} b d^{2} f^{2} + 3 \, a b^{2} d^{2} f^{2} + b^{3} d^{2} f^{2}\right )} x^{3} + 3 \, {\left (3 \, a^{2} b c d f^{2} + b^{3} c d f^{2} + 3 \, {\left (c d f^{2} + 2 \, d^{2} f\right )} a b^{2}\right )} x^{2} + 3 \, {\left (2 \, b^{3} d^{2} + 3 \, {\left (c^{2} f^{2} + 4 \, c d f\right )} a b^{2}\right )} x + {\left (9 \, a b^{2} c^{2} f^{2} x e^{\left (4 \, e\right )} + {\left (3 \, a^{2} b d^{2} f^{2} e^{\left (4 \, e\right )} + 3 \, a b^{2} d^{2} f^{2} e^{\left (4 \, e\right )} + b^{3} d^{2} f^{2} e^{\left (4 \, e\right )}\right )} x^{3} + 3 \, {\left (3 \, a^{2} b c d f^{2} e^{\left (4 \, e\right )} + 3 \, a b^{2} c d f^{2} e^{\left (4 \, e\right )} + b^{3} c d f^{2} e^{\left (4 \, e\right )}\right )} x^{2}\right )} e^{\left (4 \, f x\right )} + 2 \, {\left (9 \, a b^{2} c^{2} f e^{\left (2 \, e\right )} + 3 \, b^{3} c d e^{\left (2 \, e\right )} + {\left (3 \, a^{2} b d^{2} f^{2} e^{\left (2 \, e\right )} + 3 \, a b^{2} d^{2} f^{2} e^{\left (2 \, e\right )} + b^{3} d^{2} f^{2} e^{\left (2 \, e\right )}\right )} x^{3} + 3 \, {\left (3 \, a^{2} b c d f^{2} e^{\left (2 \, e\right )} + 3 \, {\left (c d f^{2} e^{\left (2 \, e\right )} + d^{2} f e^{\left (2 \, e\right )}\right )} a b^{2} + {\left (c d f^{2} e^{\left (2 \, e\right )} + d^{2} f e^{\left (2 \, e\right )}\right )} b^{3}\right )} x^{2} + 3 \, {\left (3 \, {\left (c^{2} f^{2} e^{\left (2 \, e\right )} + 2 \, c d f e^{\left (2 \, e\right )}\right )} a b^{2} + {\left (2 \, c d f e^{\left (2 \, e\right )} + d^{2} e^{\left (2 \, e\right )}\right )} b^{3}\right )} x\right )} e^{\left (2 \, f x\right )}}{3 \, {\left (f^{2} e^{\left (4 \, f x + 4 \, e\right )} + 2 \, f^{2} e^{\left (2 \, f x + 2 \, e\right )} + f^{2}\right )}} - \frac {2 \, {\left (6 \, a b^{2} c d f + b^{3} d^{2}\right )} x}{f^{2}} + \frac {{\left (3 \, a^{2} b d^{2} + b^{3} d^{2}\right )} {\left (2 \, f^{2} x^{2} \log \left (e^{\left (2 \, f x + 2 \, e\right )} + 1\right ) + 2 \, f x {\rm Li}_2\left (-e^{\left (2 \, f x + 2 \, e\right )}\right ) - {\rm Li}_{3}(-e^{\left (2 \, f x + 2 \, e\right )})\right )}}{2 \, f^{3}} + \frac {{\left (3 \, a^{2} b c d f + b^{3} c d f + 3 \, a b^{2} d^{2}\right )} {\left (2 \, f x \log \left (e^{\left (2 \, f x + 2 \, e\right )} + 1\right ) + {\rm Li}_2\left (-e^{\left (2 \, f x + 2 \, e\right )}\right )\right )}}{f^{3}} + \frac {{\left (6 \, a b^{2} c d f + b^{3} d^{2}\right )} \log \left (e^{\left (2 \, f x + 2 \, e\right )} + 1\right )}{f^{3}} - \frac {2 \, {\left ({\left (3 \, a^{2} b d^{2} + b^{3} d^{2}\right )} f^{3} x^{3} + 3 \, {\left (3 \, a^{2} b c d f + b^{3} c d f + 3 \, a b^{2} d^{2}\right )} f^{2} x^{2}\right )}}{3 \, f^{3}} \]

input
integrate((d*x+c)^2*(a+b*tanh(f*x+e))^3,x, algorithm="maxima")
 
output
1/3*a^3*d^2*x^3 + a^3*c*d*x^2 + b^3*c^2*(x + e/f + log(e^(-2*f*x - 2*e) + 
1)/f + 2*e^(-2*f*x - 2*e)/(f*(2*e^(-2*f*x - 2*e) + e^(-4*f*x - 4*e) + 1))) 
 + a^3*c^2*x + 3*a^2*b*c^2*log(cosh(f*x + e))/f + 1/3*(18*a*b^2*c^2*f + 6* 
b^3*c*d + (3*a^2*b*d^2*f^2 + 3*a*b^2*d^2*f^2 + b^3*d^2*f^2)*x^3 + 3*(3*a^2 
*b*c*d*f^2 + b^3*c*d*f^2 + 3*(c*d*f^2 + 2*d^2*f)*a*b^2)*x^2 + 3*(2*b^3*d^2 
 + 3*(c^2*f^2 + 4*c*d*f)*a*b^2)*x + (9*a*b^2*c^2*f^2*x*e^(4*e) + (3*a^2*b* 
d^2*f^2*e^(4*e) + 3*a*b^2*d^2*f^2*e^(4*e) + b^3*d^2*f^2*e^(4*e))*x^3 + 3*( 
3*a^2*b*c*d*f^2*e^(4*e) + 3*a*b^2*c*d*f^2*e^(4*e) + b^3*c*d*f^2*e^(4*e))*x 
^2)*e^(4*f*x) + 2*(9*a*b^2*c^2*f*e^(2*e) + 3*b^3*c*d*e^(2*e) + (3*a^2*b*d^ 
2*f^2*e^(2*e) + 3*a*b^2*d^2*f^2*e^(2*e) + b^3*d^2*f^2*e^(2*e))*x^3 + 3*(3* 
a^2*b*c*d*f^2*e^(2*e) + 3*(c*d*f^2*e^(2*e) + d^2*f*e^(2*e))*a*b^2 + (c*d*f 
^2*e^(2*e) + d^2*f*e^(2*e))*b^3)*x^2 + 3*(3*(c^2*f^2*e^(2*e) + 2*c*d*f*e^( 
2*e))*a*b^2 + (2*c*d*f*e^(2*e) + d^2*e^(2*e))*b^3)*x)*e^(2*f*x))/(f^2*e^(4 
*f*x + 4*e) + 2*f^2*e^(2*f*x + 2*e) + f^2) - 2*(6*a*b^2*c*d*f + b^3*d^2)*x 
/f^2 + 1/2*(3*a^2*b*d^2 + b^3*d^2)*(2*f^2*x^2*log(e^(2*f*x + 2*e) + 1) + 2 
*f*x*dilog(-e^(2*f*x + 2*e)) - polylog(3, -e^(2*f*x + 2*e)))/f^3 + (3*a^2* 
b*c*d*f + b^3*c*d*f + 3*a*b^2*d^2)*(2*f*x*log(e^(2*f*x + 2*e) + 1) + dilog 
(-e^(2*f*x + 2*e)))/f^3 + (6*a*b^2*c*d*f + b^3*d^2)*log(e^(2*f*x + 2*e) + 
1)/f^3 - 2/3*((3*a^2*b*d^2 + b^3*d^2)*f^3*x^3 + 3*(3*a^2*b*c*d*f + b^3*c*d 
*f + 3*a*b^2*d^2)*f^2*x^2)/f^3
 
3.1.64.8 Giac [F]

\[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\int { {\left (d x + c\right )}^{2} {\left (b \tanh \left (f x + e\right ) + a\right )}^{3} \,d x } \]

input
integrate((d*x+c)^2*(a+b*tanh(f*x+e))^3,x, algorithm="giac")
 
output
integrate((d*x + c)^2*(b*tanh(f*x + e) + a)^3, x)
 
3.1.64.9 Mupad [F(-1)]

Timed out. \[ \int (c+d x)^2 (a+b \tanh (e+f x))^3 \, dx=\int {\left (a+b\,\mathrm {tanh}\left (e+f\,x\right )\right )}^3\,{\left (c+d\,x\right )}^2 \,d x \]

input
int((a + b*tanh(e + f*x))^3*(c + d*x)^2,x)
 
output
int((a + b*tanh(e + f*x))^3*(c + d*x)^2, x)